<!doctype html>
<head>
  <link rel="stylesheet" media="all" href="style.css" />
  <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.css">
  <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
  <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
  <script src="script.js"></script>
  <title>Licenses of bundled libraries | omnibus-gitlab </title>
</head>
<body>
  <% editions = {"gitlab-ce" => "GitLab Community Edition", "gitlab-ee" => "GitLab Enterprise Edition"} %>
  <h1>Licenses for bundled libraries in the omnibus-gitlab package</h1>
  <div style="margin-left:10%;margin-right:10%;width:80%;">
    <div class="row">
      <% editions.each do |slug, edition| %>
        <div class="col-md-6">
          <h2><%= edition %></h2>
          <table class="table table-bordered">
            <% Dir.glob(File.join(@licenses_path, slug, "*")).sort.reverse.each do |minor_version| %>
              <tr class="header clickable">
                <td class="deps"><h3><%= File.basename(minor_version) %></h3></td>
              </tr>
              <% Dir.glob(File.join(minor_version, "*html")).sort.reverse.each do |license_file| %>
                <% url = "#{slug}/#{File.basename(minor_version)}/#{File.basename(license_file).gsub('+', '%2B')}" %>
                <% title = File.basename(license_file).gsub(".html", "") %>
                <tr>
                  <td>
                    <a href='<%= url %>'><%= title %></a> (<a href='<%= url.gsub("html","json") %>'>JSON</a>)
                  </td>
                </tr>
              <% end %>
            <% end %>
          </table>
        </div>
      <% end %>
    </div>
  </div>
</body>
</html>
